module.exports = {
  lintOnSave: false,
  publicPath: "./",

  // public 文件夹
  publicPath: process.env.NODE_ENV === 'production'
  ? './'
  : '/',
  

  devServer: {
    proxy: {
      '/api': {
        target: 'http://localhost:8001/',
        ws: true,
        changeOrigin: true,
        pathRewrite: { '^/api': '' },
      },
      '/answerer': {
        target: 'http://localhost:8001/answerer',
        ws: true,
        changeOrigin: true,
        pathRewrite: { '^/api': '' },
      },
    }
    // proxy:'http://localhost:8001'
  },




  // devServer: {
  //   proxy: 'http://localhost:8001/'
  // },

  chainWebpack: config => {
    config.resolve.alias
      .set("@", resolve("src"))
      .set("assets", resolve("src/assets"))
      .set("components", resolve("src/components"))
      .set("base", resolve("baseConfig"))
      .set("public", resolve("public"));
  },

}

// 配置 检查失效